﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StyleMVVM.Configuration;
using StyleMVVM.Data;
using StyleMVVM.Data.Transform;
#if NETFX_CORE
using StyleMVVM.Notification.Badge;
using StyleMVVM.Notification.Tile;
using StyleMVVM.Notification.Toast;
#endif
using StyleMVVM.View;

namespace StyleMVVM
{
	public static class KnownServicesTypes
	{
		private static TypeWrapper iTileService;
		private static TypeWrapper iBadgeService;
		private static TypeWrapper iToastService;
		private static TypeWrapper iCharmService;
		private static TypeWrapper iTransformService;
		private static TypeWrapper iConfigurationService;
		private static TypeWrapper iMessageBoxService;
		private static TypeWrapper iFilePickerService;

#if NETFX_CORE
		public static TypeWrapper ITileService
		{
			get
			{
				if (iTileService == null)
				{
					iTileService = new TypeWrapper(typeof(ITileService));
				}

				return iTileService;
			}
		}

		public static TypeWrapper IBadgeService
		{
			get
			{
				if (iBadgeService == null)
				{
					iBadgeService = new TypeWrapper(typeof(IBadgeService));
				}

				return iBadgeService;
			}
		}

		public static TypeWrapper IToastService
		{
			get
			{
				if (iToastService == null)
				{
					iToastService = new TypeWrapper(typeof(IToastService));
				}

				return iToastService;
			}
		}

		public static TypeWrapper ICharmService
		{
			get
			{
				if (iCharmService == null)
				{
					iCharmService = new TypeWrapper(typeof(ICharmService));
				}

				return iCharmService;
			}
		}
#endif

		public static TypeWrapper ITransformService
		{
			get
			{
				if (iTransformService == null)
				{
					iTransformService = new TypeWrapper(typeof(ITransformService));
				}

				return iTransformService;
			}
		}

		public static TypeWrapper IConfigurationService
		{
			get
			{
				if (iConfigurationService == null)
				{
					iConfigurationService = new TypeWrapper(typeof(IConfigurationService));
				}

				return iConfigurationService;
			}
		}

		public static TypeWrapper IMessageBoxService
		{
			get
			{
				if (iMessageBoxService == null)
				{
					iMessageBoxService = new TypeWrapper(typeof(IMessageBoxService));
				}

				return iMessageBoxService;
			}
		}

		public static TypeWrapper IFilePickerService
		{
			get
			{
				if (iFilePickerService == null)
				{
					iFilePickerService = new TypeWrapper(typeof(IFilePickerService));
				}

				return iFilePickerService;
			}
		}
	}
}